package com.example.ffmpegdemo;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;

import java.io.File;

/**
 * 创建日期：2017-07-06 on 14:38
 * 作者：ls
 */

public class DecodeActivity extends Activity {

    private static final String TAG = "DecodeActivity";

    static{
        System.loadLibrary("decode");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        DecodeUtil decodeUtil = new DecodeUtil();

        String path = Environment.getExternalStorageDirectory().getAbsolutePath();
        String inputFilePath = path + File.separator + "111.mp4";
        String outputFilePath = path + File.separator + "111.yuv";

        File file = new File(inputFilePath);
        Log.d(TAG, "文件是否存在：" + file.exists());
        Log.d(TAG, "inputFilePath = " + inputFilePath);
        decodeUtil.decodeNative(inputFilePath, outputFilePath);
    }
}
